import {
  createRouter,
  createWebHashHistory,
  Router,
  RouteRecordRaw,
  RouterOptions
} from 'vue-router'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'Login',
    component: () => import('../components/Login.vue')
  },
  {
    path: '/main',
    name: 'Main',
    component: () => import('../views/Main.vue')
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import('../components/Register.vue')
  },
  {
    path: '/forgetPwd',
    name: 'ForgetPwd',
    component: () => import('../components/ForgetPassword.vue')
  },
  {
    path: '/p2pCall',
    name: 'P2PCall',
    component: () => import('../components/P2PCall.vue')
  },
  {
    path: '/callNotification',
    name: 'CallNotification',
    component: () => import('../components/CallNotification.vue')
  },
  {
    path: '/userProfile',
    name: 'UserProfile',
    component: () => import('../components/UserProfile.vue')
  }
]

const opt: RouterOptions = {
  history: createWebHashHistory(),
  routes
}

const router: Router = createRouter(opt)

export default router
